home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / models / ellipsoid2Manip.iv < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.8 KB  |  66 lines

  1. #Inventor V2.0 ascii
  2. # Self Manipulating Ellipsoid
  3. Separator {
  4.     Rotation {
  5.        rotation 1 0 0 -1.5708
  6.     }
  7.     # Interface for ellipsoid control
  8.     Separator {
  9.         BaseColor { rgb 1 0 0 }
  10.         DEF AXIS_X_DRAGGER Translate1Dragger {
  11.             translation 1 0 0
  12.             translator DEF DRAG_BALL Separator {
  13.                 Cube { width .2 height .2 depth .2 }
  14.             }
  15.             translatorActive DEF DRAG_YELLOW_BALL Separator {
  16.                 BaseColor { rgb 1 1 0 }
  17.                 Cube { width .2 height .2 depth .2 }
  18.             }
  19.         }
  20.     }
  21.     Separator {
  22.         BaseColor { rgb 0 0 1 }
  23.         Rotation {
  24.            rotation 0 0 1  -1.5708
  25.         }
  26.         DEF AXIS_Y_DRAGGER Translate1Dragger {
  27.             translation 1 0 0
  28.             translator USE DRAG_BALL
  29.             translatorActive USE DRAG_YELLOW_BALL
  30.         }
  31.     }
  32.     Separator {
  33.         BaseColor { rgb 0 1 0 }
  34.         Rotation {
  35.            rotation 0 1 0  -1.5708
  36.         }
  37.         DEF AXIS_Z_DRAGGER Translate1Dragger {
  38.             translation 1 0 0
  39.             translator USE DRAG_BALL
  40.             translatorActive USE DRAG_YELLOW_BALL
  41.         }
  42.     }
  43.     Separator {
  44.         BaseColor { rgb .8 .8 .8 }
  45.         Scale {
  46.              scaleFactor 1 1 1 = ComposeVec3f {
  47.                  x = DecomposeVec3f {
  48.                      vector = USE AXIS_X_DRAGGER . translation
  49.                      }
  50.                      .x
  51.                  y = DecomposeVec3f {
  52.                      vector = USE AXIS_Y_DRAGGER . translation
  53.                      }
  54.                      .x
  55.                  z = DecomposeVec3f {
  56.                      vector = USE AXIS_Z_DRAGGER . translation
  57.                      }
  58.                      .x
  59.              }
  60.              . vector
  61.         }
  62.         Sphere {
  63.         }
  64.     }
  65. }
  66.